package cl.alto.dao;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConexionLoca {
	 public static Connection getConnection() throws Exception {
	        String url = "jdbc:mysql://127.0.0.1:3306/";
	        String dbName = "soap";
	        String driver = "com.mysql.jdbc.Driver";
	        String userName = "soap";
	        String password = "soap123";
	        try {
	            Class.forName(driver).newInstance();
	            String con = url + dbName;
	            return DriverManager.getConnection(con, userName, password);
	        } catch (Exception e) {
	        	System.out.println("FALLO ALGOOOO EN LA CONEXION!! " + e.getMessage());
	        	e.printStackTrace();
	            throw e;
	        }
	    }
}
